<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 50%;
            border: 2px solid grey;
            margin-top: 10px;
        }
    </style>
</head>
<body>
    <div id="app">
        <input type="text" name="" id="" v-model='money' placeholder="请输入金额">
        <div class="box">
        <div>{{money | meiyuan}}</div>
        <div>{{money | rmb}}</div>
        </div>
        <!-- <button @click='changetype'></button> -->
        
    </div>
    <script src="../js/vue.js"></script>
    <script>
        var app=new Vue({
            el:'#app',
            data:{
                money:''
            },
          
            filters:{
                "meiyuan":function(value){
                    return '$'+value
                },
                "rmb":function(value){
                    return '¥'+value
                }
            }
        })
    </script>
</body>
</html>